﻿using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Text;
namespace AgvSystem.Web.Agv_Info
{
    public partial class Show : Page
    {        
        		public string strid=""; 
		protected void Page_Load(object sender, EventArgs e)
		{
			if (!Page.IsPostBack)
			{
				if (Request.Params["id"] != null && Request.Params["id"].Trim() != "")
				{
					strid = Request.Params["id"];
					int Agv_Num=(Convert.ToInt32(strid));
					ShowInfo(Agv_Num);
				}
			}
		}
		
	private void ShowInfo(int Agv_Num)
	{
		AgvSystem.BLL.Agv_Info bll=new AgvSystem.BLL.Agv_Info();
		AgvSystem.Model.Agv_Info model=bll.GetModel(Agv_Num);
		this.lblAgv_Num.Text=model.Agv_Num.ToString();
		this.lblAgv_Speed.Text=model.Agv_Speed.ToString();
		this.lblAgv_Voltage.Text=model.Agv_Voltage.ToString();
		this.lblAgv_Distance.Text=model.Agv_Distance.ToString();
		this.lblAgv_Direction.Text=model.Agv_Direction.ToString();
		this.lblAgv_State.Text=model.Agv_State.ToString();
		this.lblAgv_Error_Message.Text=model.Agv_Error_Message.ToString();
		this.lblAgv_Target_Station_Num.Text=model.Agv_Target_Station_Num.ToString();
		this.lblAgv_Current_Station_Num.Text=model.Agv_Current_Station_Num.ToString();
		this.lblAgv_Ip_Address.Text=model.Agv_Ip_Address;
		this.lblAgv_Receive_Time.Text=model.Agv_Receive_Time.ToString();

	}


    }
}
